import Vue from 'vue'
import App from './App.vue'
//引用mint-ui
import mint from 'mint-ui'
Vue.use(mint);
//全局使用
import '../node_modules/mint-ui/lib/style.css'
//创建路由
import VueRouter from 'vue-router'
//启动路由
Vue.use(VueRouter);
//vue的http请求
import resource from 'vue-resource'
Vue.use(resource);
import home from './component/home/home.vue'
import goods from './component/goods/goods.vue'
import shoppingcar from './component/shoppingcar/shoppingcar.vue'
import settings from './component/settings/settings.vue'
import news from './component/news/news.vue'
//引入mui样式
import './static/css/mui.min.css'
//引入全局样式
import './static/css/main.css'
//创建路由表
let router = new VueRouter({
    //路由切换以后的样式
    linkActiveClass:'mui-active',
    //路由
    routes:[
         //首页
        {path:'/home',component:home},
        //商品
        {path:'/goods',component:goods},
        //购物车
        {path:'/shoppingcar',component:shoppingcar},
        //设置
        {path:'/settings',component:settings},
        //新闻
        {path:'/news',component:news}
    ]
})
new Vue({
    router:router,
    el:'#view',
    render:function(created){
        return created(App)
    }
});